Skip to content

test-companion: clearer replies: links instead of ids, a highlighted next step - #99

Merged
francisf merged 3 commits into
browserstack:masterfrom
naimish-browse:test-companion-reply-polish
Nov 23, 2026
Merged

francisf merged 3 commits into
browserstack:masterfrom
naimish-browse:test-companion-reply-polish

Conversation

@naimish-browse

@naimish-browse naimish-browse commented Nov 23, 2026 •

Copy link
Copy Markdown
Contributor

Makes Test Companion's pull request replies easier to act on.

What changes

  • Links instead of comment numbers. The report table's "Asked by" row reads @who · View comment, and the "Plan" row reads View plan, each a link.
  • A highlighted next step. A plan ends with an "Important" box that says what replying go does for that job (for example "save these test cases to Test Management"), how to change the plan first, and when it expires.
  • A link to the saved cases. After a save, the reply links the Test Management folder the cases went into. The link comes from tc tm add --json's folderUrl. A CLI that doesn't report it yet gives the folder's name without a link.
  • Nothing lost when a save fails. When approved cases can't be saved (no Test Management destination, a save that couldn't start, or some cases rejected), the reply links once to the approved cases on GitHub and says until when GitHub keeps them.
  • A plan reads as a plan everywhere. Its comment, check run and job summary say "Nothing is saved until you approve". If the plan run did save cases, they say so instead.

Safety

  • Text we didn't write, such as folder and project names, goes through one escaper. It keeps the text on one line and defuses Markdown, mentions and links.
  • The folder link is only used when it is exactly a Test Management folder page on a browserstack.com host, for the same folder the cases were saved to. The download link is built from numeric run and artifact ids. Nothing is read from the run's own summary file, which the agent can write. Tests cover each of these, and how main.mjs wires them in.

Verified live on a test repository: the View comment and View plan links, the highlighted box (GitHub renders it as an Important callout), and a plan with no download offer. The folder link waits on the CLI change that reports folderUrl. The failed-save download link is covered by tests only.

Tests
1021 pass, 0 fail, and no not ok lines.

🤖 Generated with Claude Code

…next step

- The report table links "View comment" and "View plan" instead of showing
  comment numbers.
- A plan ends with a highlighted "Next step" box that says what `go` does for
  that job, how to change the plan first, and when it expires.
- Saved test cases link to their Test Management folder.
- When approved cases aren't saved, the reply links straight to them on GitHub
  so nothing is lost. A plan no longer suggests downloading anything.

Links are built by the Action from ids of a fixed shape, never read from the
run's own summary.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Nov 23, 2026 •

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

Run configuration

  • Source mode: Auto (fallback from Default branch)
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Central YAML (base), Organization UI (inherited), Workspace UI (inherited); Enforced overrides: Organization
  • Review profile: ASSERTIVE
  • Plan: Enterprise
  • Run ID: f1cd3993-46f0-4c55-8eaf-3ee5de0b2b40

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • Trigger review
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

naimish-browse and others added 2 commits November 23, 2026 17:14
…eport

Test Management's web app keys on the numeric project id, not the PR-… code
the cases file records, so a link built from those ids opened nothing. The
link now comes from `tc tm add --json`'s `folderUrl`, and only a folder page
of exactly that shape is linked. Until the CLI reports it, the folder is
named without a link. The plan's "Will be saved to" line is plain text again.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- One escaper for text we didn't write (`plain`, now in report.mjs): a folder
  name with a blank line in it can no longer break out of its link into
  Markdown, a mention or a link.
- A plan's job summary and check say the same as its comment ("nothing is
  saved until you approve"), and a plan whose run did save cases says so.
- The folder link must name the folder the cases were saved to, and may be on
  a region's own Test Management host.
- The download link is given once per reply, says until when GitHub keeps it,
  and survives an unexpected failure after the file was confirmed.
- `go` on a fix plan opens a pull request, not always a draft; the older
  `test` job says what `go` does.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@naimish-browse
naimish-browse marked this pull request as ready for review November 23, 2026 13:02
@naimish-browse
naimish-browse requested a review from a team as a code owner November 23, 2026 13:02
@francisf
francisf merged commit 897d0f9 into browserstack:master Nov 23, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants